package net.example.model.common;

/**
 * Created by ZN on 2017/3/6.
 */
public enum ChatEventType {
    Vibration(0),
    RichChatMessage(1),
    AudioMessage(2),
    FileMessage(3);
    private int type;

    ChatEventType(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public static ChatEventType getChatType(int code) {
        for (ChatEventType type : ChatEventType.values()) {
            if (type.getType() == code) {
                return type;
            }
        }
        return null;
    }
}

